package com.wms.controller;

import com.wms.common.Result;
import com.wms.entity.Storage;
import com.wms.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/storage")
public class StorageController {
  @Autowired
  private StorageService storageService;
  @PostMapping("/list")
  public Result list(@RequestBody Storage storage){
    return storageService.list(storage);
  }
  @PostMapping("/insert")
  public Result insert(@RequestBody Storage storage){
    return storageService.insert(storage);
  }
  @GetMapping("/del")
  public Result delete(int id){
    return storageService.delete(id);
  }
  @GetMapping("/select")
  public Result select(@RequestBody Storage storage){
    return storageService.select(storage);
  }
  @PostMapping("/update")
  public Result update(@RequestBody Storage storage){
    return storageService.update(storage);
  }
}
